<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"               
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns="http://www.w3.org/1999/xhtml">
    <h:form>
        <f:view >
            <p:panel header="Event's Prizes "  >

                <p:scrollPanel  >
                    <p:dataGrid var="detail" value="#{eventControl.selectAllPrizeByEvent()} " columns="1" >
                        <p:panel header ="#{detail.event.title}"  >
                            <p:dataGrid var="winnerDetail" value="#{detail.winnerList}" columns="1">

                                <h:panelGrid  columns="2">
                                    <h:outputLabel class="color_blue " value="Pirze: "></h:outputLabel>
                                    <h:outputLabel class="color_blue_red bold"  value=" #{winnerDetail.prize.title}" ></h:outputLabel>
                                    <h:outputLabel  class="color_blue" value="Date: "></h:outputLabel>
                                    <h:outputLabel  class="color_blue bold " value="#{winnerDetail.prize.prizeDate}"    >
                                        <f:convertDateTime timeZone="GMT+7" pattern="MM/dd/yyyy" />
                                    </h:outputLabel>
                                    <h:outputLabel class="color_blue "  value="Winner: "></h:outputLabel>
                                    <h:outputLabel class="color_blue_red bold"  value="#{winnerDetail.winner.fullName}"  ></h:outputLabel>
                                    <h:outputLabel  class="color_blue" value="Department: "></h:outputLabel>
                                    <h:outputLabel  value=" #{winnerDetail.winner.departmentName}" ></h:outputLabel>

                                </h:panelGrid>

<!--                                <p:commandLink onclick="#{eventControl.redirectToEvent(event)}" value="Details"></p:commandLink>-->

                            </p:dataGrid>
                        </p:panel>
                    </p:dataGrid>
                </p:scrollPanel>

            </p:panel>
        </f:view>
    </h:form>

</ui:composition>